home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MACD 5
/
MACD 5.bin
/
workbench
/
libs
/
mpimagelib.lha
/
include
/
libraries
/
MPImage.h
Wrap
C/C++ Source or Header
|
1997-02-16
|
4KB
|
157 lines
#ifndef LIBRARIES_MPIMAGE_H
#define LIBRARIES_MPIMAGE_H
/* mark@topic.demon.co.uk */
/* mpaddock@cix.compulink.co.uk */
/* $VER: MPImage.h 7.2 (16.2.97)
*/
#include <exec/types.h>
/* Hook for progress messages */
/* object = 1, (ULONG)message = max-progress */
#define MPIP_MAX ((APTR)1)
/* object = 2, (ULONG)message = curr-progress */
#define MPIP_CURR ((APTR)2)
/* object = 3, (UBYTE *)message = Progress-Message */
#define MPIP_MESSAGE ((APTR)3)
/* Load Image stuff */
struct MPImage {
struct BitMap *BitMap;
struct E_EBitMap *EGS_BitMap;
UBYTE *Red;
UBYTE *Green;
UBYTE *Blue;
UWORD Width;
UWORD Height;
Object *Object;
BOOL GreyScale;
BOOL Cyber; // V 4.3 - for later use
};
/* Default is to remap to screen palette and return a bitmap in BitMap */
/* Only way to free is to call FreeMPImageBitMap */
/* return E_EBitMap rather than BitMap */
/* overrides MPIF_RGB */
#define MPIF_EGS (1<<0)
/* You are free to zero BitMap/EGS_BitMap before calling FreeMPImageBitMap */
/* You must then call FreeBitMap()/E_DisposeBitMap() yourself */
/* Ignored for MPIF_RGB */
/* If screen supplied then clone is screen depth deep if possible */
#define MPIF_CLONEBITMAP (1<<1)
/* Don't remap to the current screen colors */
/* Ignored for MPIF_EGS/RGB */
/* Returns error if 24 bit input */
#define MPIF_NOREMAP (1<<2)
/* return Red, Green, Blue instead of BitMap */
#define MPIF_RGB (1<<3)
/* return Red, Green, Blue instead of BitMap */
/* If image is greyscale then Red, Green and Blue will be the same */
/* and GreyScale will be TRUE */
#define MPIF_GREY (1<<4)
/* As MPIF_GREY but force the input to be remapped to GreyScale */
#define MPIF_FORCEGREY (1<<5)
/* When remapping to grey use linear (not colour based) mapping */
#define MPIF_LINEARGREY (1<<6)
/* Save Image stuff */
/* CAMG mode - data is modeid */
/* If not supplied, or INVALID_ID supplied then internally generated */
#define MPIS_MODE (TAG_USER + 1)
/* Save Format - data is (char *) */
/* If not supplied or NULL then save BW16 */
#define MPIS_FORMAT (TAG_USER + 2)
/* 16 colour grey scale */
#define MPI_BW16 "BW16"
/* 256 colour grey scale */
#define MPI_BW256 "BW256"
/* HAM 6 fixed (internal) palette */
#define MPI_HAM6 "HAM6"
/* HAM 8 fixed (internal) palette */
#define MPI_HAM8 "HAM8"
/* 24 bit ILBM */
#define MPI_ILBM24 "ILBM24"
/* P6 (or P5 if all planes are the same) PPM format */
#define MPI_PPM "PPM"
/* HAM 6 generate best palette */
#define MPI_HAM6P "HAM6P"
/* HAM 8 generate best palette */
#define MPI_HAM8P "HAM8P"
/* COLOUR generate palette */
#define MPI_COLOUR "COLOUR"
/* EHB generate palette */
#define MPI_EHB "EHB"
/* JPEG (requires env:mpimage/cjpeg to be set e.g. 'cjpeg "%s" "%s"') */
#define MPI_JPEG "JPEG"
/* PNG (requires env:mpimage/pnmtopng to be set e.g. 'pnmtopng "%s" >"%s"') */
#define MPI_PNG "PNG"
/* DCTV3 (requires dctv.library) */
#define MPI_DCTV3 "DCTV3"
/* DCTV4 (requires dctv.library) */
#define MPI_DCTV4 "DCTV4"
/* Filename of palette to use - data is (char *) */
/* Overrides internal and generated palettes */
/* Can be NULL */
#define MPIS_PALETTE (TAG_USER + 3)
/* Number of colours to generate/use from palette - data is ULONG */
/* Only used for COLOUR */
/* If not supplied defaults to number of colours in palette (if supplied) */
/* otherwise 16 */
/* If > colours in palette then ignored */
/* max 256, min 2 */
#define MPIS_COLOURS (TAG_USER + 4)
/* Use 12 bit colour palette for COLOUR/EHB */
#define MPIS_12BIT (TAG_USER + 5)
/* Mode name data is char *, overridden by MPIS_MODE - invalid names ignored */
#define MPIS_MODENAME (TAG_USER + 6)
/* V5.0 beta1 */
/* Linear Mapping for BW16/BW256, data is BOOL */
#define MPIS_LINEAR (TAG_USER + 7)
/* V5.0 beta2 */
/* Palette map for BW16/BW256, data is UBYTE * */
#define MPIS_GREYMAP (TAG_USER + 8)
/* V7.0 */
/* UBYTE[768] Palette to use */
#define MPIS_OLDPALETTE (TAG_USER + 9)
/* V7.0 */
/* UBYTE[768] Palette to used */
#define MPIS_NEWPALETTE (TAG_USER + 10)
/* V7.0 */
/* struct BitMap * BitMap to save to */
#define MPIS_BITMAP (TAG_USER + 11)
/* Flags for SetMPImageScreen() */
/* Use progress requesters */
#define MPIF_PROGRESS 1
/* Process Image stuff V7.0 */
struct MPProcess {
UBYTE *Red;
UBYTE *Green;
UBYTE *Blue;
UWORD Width;
UWORD Height;
};
#endif